﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<Excell_On_Services.ViewModels.EmployeeModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Create
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

   <p class="mc_title">Managerment Employee</p>
    <div class="content-box"><!-- Start Content Box -->
        <div class="content-box-header">
            <p>Create New</p>
            <div>
                <%: Html.ActionLink("Back to List", "Index") %>
            </div>
        </div>
        <div class="content-box-content">
			<div class="tab-content default-tab" id="tab1">
            <% using (Html.BeginForm()) {%>
                <%: Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.") %>
                <table cellpadding="5" id="add_new_item">
                        <tbody>
                            <tr>
                                <td></td>
                                <td><%: Html.HiddenFor(model => model.EmployeeID)%></td>
                            </tr>
                            <tr>
                                <td class="ani_text"><%: Html.LabelFor(model => model.username)%></td>
                                <td><%: Html.TextBoxFor(model => model.username)%>
                                    <%: Html.ValidationMessageFor(model => model.username)%>
                                </td>
                            </tr>
                            <tr>
                                <td class="ani_text"><%: Html.LabelFor(model => model.Email)%></td>
                                <td><%: Html.TextBoxFor(model => model.Email)%>
                                    <%: Html.ValidationMessageFor(model => model.Email)%>
                                </td>
                            </tr>

                            <tr>
                                <td class="ani_text"><%: Html.LabelFor(model => model.Password)%></td>
                                <td><%: Html.PasswordFor(model => model.Password)%>
                                    <%: Html.ValidationMessageFor(model => model.Password)%>
                                </td>
                            </tr>
                            <tr>
                                <td class="ani_text"><%: Html.LabelFor(model => model.ConfirmPassword)%></td>
                                <td><%: Html.PasswordFor(model => model.ConfirmPassword)%>
                                    <%: Html.ValidationMessageFor(model => model.ConfirmPassword)%>
                                </td>
                            </tr>

                            <tr>
                                <td class="ani_text"><%: Html.LabelFor(model => model.FullName)%></td>
                                <td>
                                    <%: Html.TextBoxFor(model => model.FullName)%>
                                    <%: Html.ValidationMessageFor(model => model.FullName)%>
                                </td>
                            </tr>
                            <tr>
                                <td class="ani_text"><%: Html.LabelFor(model => model.DepartmentID)%></td>
                                <td>
                                    <%: Html.DropDownListFor(model => model.DepartmentID,(SelectList)((IEnumerable)ViewData["DepartmentItem"]),"-- Select Department --")%>
                                    <%: Html.ValidationMessageFor(model => model.DepartmentID) %>
                                </td>
                            </tr>
                            
                            <tr>
                                <td class="ani_text"><%: Html.LabelFor(model => model.Address)%></td>
                                <td><%: Html.TextBoxFor(model => model.Address)%>
                                    <%: Html.ValidationMessageFor(model => model.Address)%>
                                </td>
                            </tr>
                            <tr>
                                <td class="ani_text"><%: Html.LabelFor(model => model.BirthDate)%></td>
                                <td><%: Html.TextBoxFor(model => model.BirthDate, new { onclick = "displayDatePicker('BirthDate', this);" })%>
                                    <%: Html.ValidationMessageFor(model => model.BirthDate)%>
                                </td>
                            </tr>
                            <tr>
                                <td class="ani_text"><%: Html.LabelFor(model => model.Sex) %></td>
                                <td>
                                        Male: <%: Html.RadioButtonFor(model => model.Sex, true, new { Checked = "checked", Style="width:40px"})%>
                                         Female: <%: Html.RadioButtonFor(model => model.Sex, false, new { Style="width: 50px;" })%>
                                        <%: Html.ValidationMessageFor(model => model.Sex) %>
                                </td>
                            </tr>
                            <tr>
                                <td class="ani_text"><%: Html.LabelFor(model => model.Phone)%></td>
                                <td><%: Html.TextBoxFor(model => model.Phone)%>
                                    <%: Html.ValidationMessageFor(model => model.Phone)%>
                                </td>
                            </tr>
                            <tr>
                                <td class="ani_text"><%: Html.LabelFor(model => model.Notes)%></td>
                                <td><%: Html.TextAreaFor(model => model.Notes)%>
                                    <%: Html.ValidationMessageFor(model => model.Notes)%>
                                </td>
                            </tr>
                            <tr>
                                <td class="ani_text"> Select  Roles : </td>
                                <td></td>
                                <td></td>
                            </tr>
                            <%foreach (var item in Roles.GetAllRoles())
                            { %>
                            <tr>
                                <td></td>
                                <td> 
                                     <%:item %>
                                </td>
                                <td><%: Html.CheckBox(item, false)%></td>
                                
                            </tr>
                            <%} %>
                            <tr>
                                <td colspan="2"><input type="submit" value="Create" class="button" /></td>
                            </tr>


                        </tbody>
                    </table>
                    <% } %>
                </div>
            </div>
        </div>
    
</asp:Content>

